Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it build again #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Make it build again #20

wants to merge 6 commits into from

Conversation

h0tw1r3
Copy link

@h0tw1r3 h0tw1r3 commented Aug 19, 2022

Archive changed to release as it includes the dependency for oniguruma. Otherwise a compile error occurs because the source does not exist in the jq/modules directory.

Changed autoreconf due to a known bug in the last jq release. jqlang/jq#1778

@h0tw1r3
Copy link
Author

h0tw1r3 commented Oct 15, 2022

@winebarrel can you review, merge, and ideally cut a new release? without this change the gem is not install-able.

@h0tw1r3 h0tw1r3 changed the title Change archive to latest release Fix #14 #16 #19 Oct 16, 2022
@h0tw1r3 h0tw1r3 changed the title Fix #14 #16 #19 Make it build again Oct 16, 2022
@h0tw1r3
Copy link
Author

h0tw1r3 commented Oct 16, 2022

Fixes or works-around open issues, #14 #16 #19

@jakeonfire
Copy link

jakeonfire commented Nov 18, 2022

i'm having trouble installing this on an M1 mac:

Building native extensions. This could take a while...
ERROR:  While executing gem ... (Gem::Ext::BuildError)
    ERROR: Failed to build gem native extension.

    current directory: /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/ruby-jq-0.2.3/ext
/Users/jakefrautschi/.rbenv/versions/3.1.0/bin/ruby -I /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/site_ruby/3.1.0 extconf.rb
Buildling jq using packaged libraries.
Downloading onigmo-6.2.0.tar.gz (100%) 
Extracting onigmo-6.2.0.tar.gz into tmp/arm64-apple-darwin21.6.0/ports/onigmo/6.2.0... OK
Running 'autoreconf' for onigmo 6.2.0... OK
Running 'configure' for onigmo 6.2.0... OK
Running 'compile' for onigmo 6.2.0... OK
Running 'install' for onigmo 6.2.0... OK
Activating onigmo 6.2.0 (from ports/arm64-apple-darwin21.6.0/onigmo/6.2.0)...
Downloading cff5336ec71b6fee396a95bb0e4bea365e0cd1e8.tar.gz 
Extracting cff5336ec71b6fee396a95bb0e4bea365e0cd1e8.tar.gz into tmp/arm64-apple-darwin21.6.0/ports/jq/1.6... OK
Running git apply with /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/ruby-jq-0.2.3/ext/jq-onigmo.patch... ERROR, review '/Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/ruby-jq-0.2.3/ext/tmp/arm64-apple-darwin21.6.0/ports/jq/1.6/patch.log' to see what happened. Last lines are:
========================================================================
warning: unable to access 'config': Is a directory
warning: unable to access 'config': Is a directory
fatal: unknown error occurred while reading the configuration files
========================================================================
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/jakefrautschi/.rbenv/versions/3.1.0/bin/$(RUBY_BASE_NAME)
	--use-system-libraries
/Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:460:in `block in execute': Failed to complete patch task (RuntimeError)
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `chdir'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:426:in `execute'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:104:in `block in apply_patch'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:114:in `apply_patch'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:120:in `block in patch'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:118:in `each'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:118:in `patch'
	from /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mini_portile2-2.8.0/lib/mini_portile2/mini_portile.rb:184:in `cook'
	from extconf.rb:46:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/ruby-jq-0.2.3 for inspection.
Results logged to /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/ruby-jq-0.2.3/gem_make.out

any tips @h0tw1r3 ?

@jakeonfire
Copy link

related: jqlang/jq#2381

@jakeonfire
Copy link

jakeonfire commented Nov 19, 2022

got the original fork working #19 (comment)

@h0tw1r3
Copy link
Author

h0tw1r3 commented Dec 9, 2022

@jakeonfire you're running into a bug in another gem unfortunately. It's related to git.
flavorjones/mini_portile#119

@flavorjones
Copy link

@h0tw1r3 @jakeonfire please help me reproduce the problem you're seeing with the config directory error! what branch are you running on, what version of ruby, can you run bundle env?

@jakeonfire
Copy link

jakeonfire commented Dec 22, 2022

@flavorjones i don't have the setup around anymore from when i received that error (hence the lack of response - sorry). but i do disagree with @h0tw1r3's assertion that this is not installable on an M1 mac. i had to do a couple things to install the latest release (0.2.1) per #19 (comment) (using RUBYJQ_USE_SYSTEM_LIBRARIES=1). i think changes would likely be needed to install correctly with the included libs on M1, however.
in case it is helpful, here is the output from bundle env from where i was trying to install:

Environment

Bundler       2.3.23
  Platforms   ruby, arm64-darwin-21
Ruby          3.1.0p0 (2021-12-25 revision fb4df44d1670e9d25aef6b235a7281199a177edb) [arm64-darwin-21]
  Full Path   /Users/jakefrautschi/.rbenv/versions/3.1.0/bin/ruby
  Config Dir  /Users/jakefrautschi/.rbenv/versions/3.1.0/etc
RubyGems      3.3.17
  Gem Home    /Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0
  Gem Path    /Users/jakefrautschi/.gem/ruby/3.1.0:/Users/jakefrautschi/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0
  User Home   /Users/jakefrautschi
  User Path   /Users/jakefrautschi/.gem/ruby/3.1.0
  Bin Dir     /Users/jakefrautschi/.rbenv/versions/3.1.0/bin
Tools         
  Git         2.35.1
  RVM         not installed
  rbenv       rbenv 1.2.0
  chruby      not installed

Bundler Build Metadata

Built At          2022-10-05
Git SHA           250d9d485d
Released Version  true

Gemfile

Gemfile

# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in ruby-jq.gemspec
gemspec

Gemfile.lock

PATH
  remote: .
  specs:
    ruby-jq (0.2.1)
      mini_portile2 (>= 2.2.0)
      multi_json

GEM
  remote: https://rubygems.org/
  specs:
    ast (2.4.2)
    diff-lcs (1.5.0)
    json (2.6.2)
    mini_portile2 (2.8.0)
    multi_json (1.15.0)
    parallel (1.22.1)
    parser (3.1.2.1)
      ast (~> 2.4.1)
    rainbow (3.1.1)
    rake (13.0.6)
    rake-compiler (0.9.9)
      rake
    regexp_parser (2.6.1)
    rexml (3.2.5)
    rspec (3.12.0)
      rspec-core (~> 3.12.0)
      rspec-expectations (~> 3.12.0)
      rspec-mocks (~> 3.12.0)
    rspec-core (3.12.0)
      rspec-support (~> 3.12.0)
    rspec-expectations (3.12.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.12.0)
    rspec-mocks (3.12.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.12.0)
    rspec-support (3.12.0)
    rubocop (1.39.0)
      json (~> 2.3)
      parallel (~> 1.10)
      parser (>= 3.1.2.1)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 1.8, < 3.0)
      rexml (>= 3.2.5, < 4.0)
      rubocop-ast (>= 1.23.0, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 1.4.0, < 3.0)
    rubocop-ast (1.23.0)
      parser (>= 3.1.1.0)
    ruby-progressbar (1.11.0)
    unicode-display_width (2.3.0)

PLATFORMS
  arm64-darwin-21

DEPENDENCIES
  rake
  rake-compiler
  rspec
  rubocop
  ruby-jq!

BUNDLED WITH
   2.3.23

Gemspecs

ruby-jq.gemspec

# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'jq/version'

Gem::Specification.new do |spec|
  spec.name          = 'ruby-jq'
  spec.version       = JQ::VERSION
  spec.author        = 'winebarrel'
  spec.email         = 'sgwr_dts@yahoo.co.jp'
  spec.description   = 'Ruby bindings for jq'
  spec.summary       = 'Ruby bindings for jq'
  spec.homepage      = 'https://github.com/winebarrel/ruby-jq'
  spec.license       = 'MIT'

  spec.files         = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
  spec.extensions    = 'ext/extconf.rb'
  # spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
  # spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
  spec.require_paths = ['lib']
  spec.required_ruby_version = '2.7'

  spec.add_dependency 'multi_json'
  spec.add_runtime_dependency 'mini_portile2', '>= 2.2.0'

  spec.add_development_dependency 'rake'
  spec.add_development_dependency 'rake-compiler'
  spec.add_development_dependency 'rspec'
  spec.add_development_dependency 'rubocop'
end

@h0tw1r3
Copy link
Author

h0tw1r3 commented Dec 22, 2022

@flavorjones i don't have the setup around anymore from when i received that error (hence the lack of response - sorry). but i do disagree with @h0tw1r3's assertion that this is not installable on an M1 mac. i had to do a couple things to install the latest release (0.2.1) per #19 (comment) (using RUBYJQ_USE_SYSTEM_LIBRARIES=1). i think changes would likely be needed to install correctly with the included libs on M1, however. in case it is helpful, here is the output from bundle env from where i was trying to install:

Building against system libraries works on my system also, but the resulting build does not function correctly on an M1 mac (see issue #14).

The build is broken when you do not use system libraries. which is what @flavorjones is referring to.

@jakeonfire
Copy link

jakeonfire commented Dec 23, 2022

gotcha. then reproduction steps are simply to follow the readme on an M1* mac, using bundler, rubygems, or trying from local source (w/o using system libraries).

@flavorjones
Copy link

OK, the problem doesn't seem to be with mini_portile. I looked at the extconf file, and if I do those exact steps manually, I get the same failure that I get when I try to install the gem.

Commands:

wget https://github.com/stedolan/jq/archive/jq-1.6.tar.gz
tar -zxvf jq-1.6.tar.gz
cd jq-jq-1.6/
autoreconf -i
./configure --enable-shared --disable-maintainer-mode
make

result:

$ make
  GEN      src/builtin.inc
fatal: not a git repository (or any of the parent directories): .git
  GEN      src/version.h
fatal: not a git repository (or any of the parent directories): .git
make  all-recursive
make[1]: Entering directory '/home/flavorjones/tmp/jq-jq-1.6'
Making all in modules/oniguruma
make[2]: *** No rule to make target 'all'.  Stop.
make[2]: Entering directory '/home/flavorjones/tmp/jq-jq-1.6/modules/oniguruma'
make[2]: Leaving directory '/home/flavorjones/tmp/jq-jq-1.6/modules/oniguruma'
make[1]: *** [Makefile:1107: all-recursive] Error 1
make[1]: Leaving directory '/home/flavorjones/tmp/jq-jq-1.6'
make: *** [Makefile:778: all] Error 2
Here's the complete shell session.
$ wget https://github.com/stedolan/jq/archive/jq-1.6.tar.gz
--2022-12-22 21:55:11--  https://github.com/stedolan/jq/archive/jq-1.6.tar.gz
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/stedolan/jq/tar.gz/refs/tags/jq-1.6 [following]
--2022-12-22 21:55:11--  https://codeload.github.com/stedolan/jq/tar.gz/refs/tags/jq-1.6
Resolving codeload.github.com (codeload.github.com)... 140.82.114.9
Connecting to codeload.github.com (codeload.github.com)|140.82.114.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 417405 (408K) [application/x-gzip]
Saving to: ‘jq-1.6.tar.gz’

jq-1.6.tar.gz                 100%[===============================================>] 407.62K  1.22MB/s    in 0.3s    

2022-12-22 21:55:12 (1.22 MB/s) - ‘jq-1.6.tar.gz’ saved [417405/417405]


$ tar -zxvf jq-1.6.tar.gz
jq-jq-1.6/
jq-jq-1.6/.github/
jq-jq-1.6/.github/ISSUE_TEMPLATE/
jq-jq-1.6/.github/ISSUE_TEMPLATE/bug_report.md
jq-jq-1.6/.gitmodules
jq-jq-1.6/.travis.yml
jq-jq-1.6/AUTHORS
jq-jq-1.6/COPYING
jq-jq-1.6/ChangeLog
jq-jq-1.6/Dockerfile
jq-jq-1.6/KEYS
jq-jq-1.6/Makefile.am
jq-jq-1.6/NEWS
jq-jq-1.6/README
jq-jq-1.6/README.md
jq-jq-1.6/appveyor.yml
jq-jq-1.6/build/
jq-jq-1.6/compile-ios.sh
jq-jq-1.6/config/
jq-jq-1.6/config/m4/
jq-jq-1.6/config/m4/check-math-func.m4
jq-jq-1.6/config/m4/find-func-no-libs.m4
jq-jq-1.6/config/m4/find-func-no-libs2.m4
jq-jq-1.6/config/m4/find-func.m4
jq-jq-1.6/config/m4/misc.m4
jq-jq-1.6/configure.ac
jq-jq-1.6/docs/
jq-jq-1.6/docs/Gemfile
jq-jq-1.6/docs/Gemfile.lock
jq-jq-1.6/docs/README.md
jq-jq-1.6/docs/Rakefile
jq-jq-1.6/docs/Rakefile.manual
jq-jq-1.6/docs/Rakefile.website
jq-jq-1.6/docs/content/
jq-jq-1.6/docs/content/1.tutorial/
jq-jq-1.6/docs/content/1.tutorial/default.yml
jq-jq-1.6/docs/content/2.download/
jq-jq-1.6/docs/content/2.download/default.yml
jq-jq-1.6/docs/content/3.manual/
jq-jq-1.6/docs/content/3.manual/manual.yml
jq-jq-1.6/docs/content/3.manual/v1.3/
jq-jq-1.6/docs/content/3.manual/v1.3/manual.yml
jq-jq-1.6/docs/content/3.manual/v1.4/
jq-jq-1.6/docs/content/3.manual/v1.4/manual.yml
jq-jq-1.6/docs/content/3.manual/v1.5/
jq-jq-1.6/docs/content/3.manual/v1.5/manual.yml
jq-jq-1.6/docs/content/3.manual/v1.6/
jq-jq-1.6/docs/content/3.manual/v1.6/manual.yml
jq-jq-1.6/docs/content/index/
jq-jq-1.6/docs/content/index/index.yml
jq-jq-1.6/docs/public/
jq-jq-1.6/docs/public/.htaccess
jq-jq-1.6/docs/public/css/
jq-jq-1.6/docs/public/css/base.scss
jq-jq-1.6/docs/public/jq.png
jq-jq-1.6/docs/public/js/
jq-jq-1.6/docs/public/js/manual-search.js
jq-jq-1.6/docs/public/robots.txt
jq-jq-1.6/docs/site.yml
jq-jq-1.6/docs/templates/
jq-jq-1.6/docs/templates/default.liquid
jq-jq-1.6/docs/templates/index.liquid
jq-jq-1.6/docs/templates/manual.liquid
jq-jq-1.6/docs/templates/shared/
jq-jq-1.6/docs/templates/shared/_footer.liquid
jq-jq-1.6/docs/templates/shared/_head.liquid
jq-jq-1.6/docs/templates/shared/_navbar.liquid
jq-jq-1.6/jq.1.prebuilt
jq-jq-1.6/jq.spec
jq-jq-1.6/m4/
jq-jq-1.6/m4/ax_compare_version.m4
jq-jq-1.6/m4/ax_prog_bison_version.m4
jq-jq-1.6/modules/
jq-jq-1.6/modules/oniguruma/
jq-jq-1.6/scripts/
jq-jq-1.6/scripts/crosscompile
jq-jq-1.6/scripts/gen_utf8_tables.py
jq-jq-1.6/scripts/update-website
jq-jq-1.6/scripts/version
jq-jq-1.6/sig/
jq-jq-1.6/sig/jq-release.key
jq-jq-1.6/sig/v1.3/
jq-jq-1.6/sig/v1.3/jq-linux-x86.asc
jq-jq-1.6/sig/v1.3/jq-linux-x86_64.asc
jq-jq-1.6/sig/v1.3/jq-osx-x86.asc
jq-jq-1.6/sig/v1.3/jq-osx-x86_64.asc
jq-jq-1.6/sig/v1.3/jq-win32.exe.asc
jq-jq-1.6/sig/v1.3/jq-win64.exe.asc
jq-jq-1.6/sig/v1.3/sha256sum.txt
jq-jq-1.6/sig/v1.4/
jq-jq-1.6/sig/v1.4/jq-linux-x86.asc
jq-jq-1.6/sig/v1.4/jq-linux-x86_64.asc
jq-jq-1.6/sig/v1.4/jq-osx-x86.asc
jq-jq-1.6/sig/v1.4/jq-osx-x86_64.asc
jq-jq-1.6/sig/v1.4/jq-solaris11-32.asc
jq-jq-1.6/sig/v1.4/jq-solaris11-64.asc
jq-jq-1.6/sig/v1.4/jq-win32.exe.asc
jq-jq-1.6/sig/v1.4/jq-win64.exe.asc
jq-jq-1.6/sig/v1.4/sha256sum.txt
jq-jq-1.6/sig/v1.5/
jq-jq-1.6/sig/v1.5/jq-linux32-no-oniguruma.asc
jq-jq-1.6/sig/v1.5/jq-linux32.asc
jq-jq-1.6/sig/v1.5/jq-linux64.asc
jq-jq-1.6/sig/v1.5/jq-osx-amd64.asc
jq-jq-1.6/sig/v1.5/jq-win32.exe.asc
jq-jq-1.6/sig/v1.5/jq-win64.exe.asc
jq-jq-1.6/sig/v1.5/sha256sum.txt
jq-jq-1.6/sig/v1.5rc1/
jq-jq-1.6/sig/v1.5rc1/jq-linux-x86_64-static.asc
jq-jq-1.6/sig/v1.5rc1/jq-win32.exe.asc
jq-jq-1.6/sig/v1.5rc1/jq-win64.exe.asc
jq-jq-1.6/sig/v1.5rc1/sha256sum.txt
jq-jq-1.6/sig/v1.5rc2/
jq-jq-1.6/sig/v1.5rc2/jq-linux-x86.asc
jq-jq-1.6/sig/v1.5rc2/jq-linux-x86_64.asc
jq-jq-1.6/sig/v1.5rc2/jq-osx-x86_64.asc
jq-jq-1.6/sig/v1.5rc2/jq-win32.exe.asc
jq-jq-1.6/sig/v1.5rc2/jq-win64.exe.asc
jq-jq-1.6/sig/v1.5rc2/sha256sum.txt
jq-jq-1.6/sig/v1.6/
jq-jq-1.6/sig/v1.6/jq-linux32.asc
jq-jq-1.6/sig/v1.6/jq-linux64.asc
jq-jq-1.6/sig/v1.6/jq-osx-amd64.asc
jq-jq-1.6/sig/v1.6/jq-win32.exe.asc
jq-jq-1.6/sig/v1.6/jq-win64.exe.asc
jq-jq-1.6/sig/v1.6/sha256sum.txt
jq-jq-1.6/src/
jq-jq-1.6/src/builtin.c
jq-jq-1.6/src/builtin.h
jq-jq-1.6/src/builtin.jq
jq-jq-1.6/src/bytecode.c
jq-jq-1.6/src/bytecode.h
jq-jq-1.6/src/compile.c
jq-jq-1.6/src/compile.h
jq-jq-1.6/src/exec_stack.h
jq-jq-1.6/src/execute.c
jq-jq-1.6/src/inject_errors.c
jq-jq-1.6/src/jq.h
jq-jq-1.6/src/jq_parser.h
jq-jq-1.6/src/jq_test.c
jq-jq-1.6/src/jv.c
jq-jq-1.6/src/jv.h
jq-jq-1.6/src/jv_alloc.c
jq-jq-1.6/src/jv_alloc.h
jq-jq-1.6/src/jv_aux.c
jq-jq-1.6/src/jv_dtoa.c
jq-jq-1.6/src/jv_dtoa.h
jq-jq-1.6/src/jv_file.c
jq-jq-1.6/src/jv_parse.c
jq-jq-1.6/src/jv_print.c
jq-jq-1.6/src/jv_unicode.c
jq-jq-1.6/src/jv_unicode.h
jq-jq-1.6/src/jv_utf8_tables.h
jq-jq-1.6/src/lexer.c
jq-jq-1.6/src/lexer.h
jq-jq-1.6/src/lexer.l
jq-jq-1.6/src/libm.h
jq-jq-1.6/src/linker.c
jq-jq-1.6/src/linker.h
jq-jq-1.6/src/locfile.c
jq-jq-1.6/src/locfile.h
jq-jq-1.6/src/main.c
jq-jq-1.6/src/opcode_list.h
jq-jq-1.6/src/parser.c
jq-jq-1.6/src/parser.h
jq-jq-1.6/src/parser.y
jq-jq-1.6/src/util.c
jq-jq-1.6/src/util.h
jq-jq-1.6/tests/
jq-jq-1.6/tests/base64.test
jq-jq-1.6/tests/base64test
jq-jq-1.6/tests/jq-f-test.sh
jq-jq-1.6/tests/jq.test
jq-jq-1.6/tests/jqtest
jq-jq-1.6/tests/mantest
jq-jq-1.6/tests/modules/
jq-jq-1.6/tests/modules/.jq
jq-jq-1.6/tests/modules/a.jq
jq-jq-1.6/tests/modules/b/
jq-jq-1.6/tests/modules/b/b.jq
jq-jq-1.6/tests/modules/c/
jq-jq-1.6/tests/modules/c/c.jq
jq-jq-1.6/tests/modules/c/d.jq
jq-jq-1.6/tests/modules/data.json
jq-jq-1.6/tests/modules/lib/
jq-jq-1.6/tests/modules/lib/jq/
jq-jq-1.6/tests/modules/lib/jq/e/
jq-jq-1.6/tests/modules/lib/jq/e/e.jq
jq-jq-1.6/tests/modules/lib/jq/f.jq
jq-jq-1.6/tests/modules/syntaxerror/
jq-jq-1.6/tests/modules/syntaxerror/syntaxerror.jq
jq-jq-1.6/tests/modules/test_bind_order.jq
jq-jq-1.6/tests/modules/test_bind_order0.jq
jq-jq-1.6/tests/modules/test_bind_order1.jq
jq-jq-1.6/tests/modules/test_bind_order2.jq
jq-jq-1.6/tests/onig.supp
jq-jq-1.6/tests/onig.test
jq-jq-1.6/tests/onigtest
jq-jq-1.6/tests/optional.test
jq-jq-1.6/tests/optionaltest
jq-jq-1.6/tests/setup
jq-jq-1.6/tests/shtest
jq-jq-1.6/tests/torture/
jq-jq-1.6/tests/torture/input0.json
jq-jq-1.6/tests/utf8-truncate.jq
jq-jq-1.6/tests/utf8test

$ cd jq-jq-1.6/

$ autoreconf -i
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config/m4'.
libtoolize: copying file 'config/m4/libtool.m4'
libtoolize: copying file 'config/m4/ltoptions.m4'
libtoolize: copying file 'config/m4/ltsugar.m4'
libtoolize: copying file 'config/m4/ltversion.m4'
libtoolize: copying file 'config/m4/lt~obsolete.m4'
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
configure.ac:17: installing 'config/ar-lib'
configure.ac:17: installing 'config/compile'
configure.ac:25: installing 'config/config.guess'
configure.ac:25: installing 'config/config.sub'
configure.ac:15: installing 'config/install-sh'
configure.ac:15: installing 'config/missing'
Makefile.am: installing 'config/depcomp'
configure.ac: installing 'config/ylwrap'
parallel-tests: installing 'config/test-driver'

$ ./configure --enable-shared --disable-maintainer-mode
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for bison... bison -y
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for valgrind... valgrind
checking for memmem... yes
checking for mkstemp... yes
checking shlwapi.h usability... no
checking shlwapi.h presence... no
checking for shlwapi.h... no
checking for bundle... bundle
checking for Ruby dependencies... configure: WARNING: 
*****************************************************************
*  Ruby dependencies for building jq documentation not found.   *
*  You can still build, install and hack on jq, but the manpage *
*  will not be rebuilt and some of the tests will not run.      *
*  See docs/README.md for how to install the docs dependencies. *
*****************************************************************
no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for isatty... yes
checking for _isatty... no
checking for strptime... yes
checking for strftime... yes
checking for timegm... yes
checking for gmtime_r... yes
checking for gmtime... yes
checking for localtime_r... yes
checking for localtime... yes
checking for gettimeofday... yes
checking for struct tm.tm_gmtoff... yes
checking for struct tm.__tm_gmtoff... no
checking for acos in -lm... yes
checking for acosh in -lm... yes
checking for asin in -lm... yes
checking for asinh in -lm... yes
checking for atan2 in -lm... yes
checking for atan in -lm... yes
checking for atanh in -lm... yes
checking for cbrt in -lm... yes
checking for ceil in -lm... yes
checking for copysign in -lm... yes
checking for cos in -lm... yes
checking for cosh in -lm... yes
checking for drem in -lm... yes
checking for erf in -lm... yes
checking for erfc in -lm... yes
checking for exp10 in -lm... yes
checking for exp2 in -lm... yes
checking for exp in -lm... yes
checking for expm1 in -lm... yes
checking for fabs in -lm... yes
checking for fdim in -lm... yes
checking for floor in -lm... yes
checking for fma in -lm... yes
checking for fmax in -lm... yes
checking for fmin in -lm... yes
checking for fmod in -lm... yes
checking for frexp in -lm... yes
checking for gamma in -lm... yes
checking for hypot in -lm... yes
checking for j0 in -lm... yes
checking for j1 in -lm... yes
checking for jn in -lm... yes
checking for ldexp in -lm... yes
checking for lgamma in -lm... yes
checking for log10 in -lm... yes
checking for log1p in -lm... yes
checking for log2 in -lm... yes
checking for log in -lm... yes
checking for logb in -lm... yes
checking for modf in -lm... yes
checking for lgamma_r in -lm... yes
checking for nearbyint in -lm... yes
checking for nextafter in -lm... yes
checking for nexttoward in -lm... yes
checking for pow10 in -lm... no
checking for pow in -lm... yes
checking for remainder in -lm... yes
checking for rint in -lm... yes
checking for round in -lm... yes
checking for scalb in -lm... yes
checking for scalbln in -lm... yes
checking for significand in -lm... yes
checking for sin in -lm... yes
checking for sinh in -lm... yes
checking for sqrt in -lm... yes
checking for tan in -lm... yes
checking for tanh in -lm... yes
checking for tgamma in -lm... yes
checking for trunc in -lm... yes
checking for y0 in -lm... yes
checking for y1 in -lm... yes
checking for yn in -lm... yes
checking for thread-local storage... yes
checking whether byte ordering is bigendian... no
checking oniguruma.h usability... no
checking oniguruma.h presence... no
checking for oniguruma.h... no
configure: Oniguruma was not found. Will use the packaged oniguruma.
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

$ make
  GEN      src/builtin.inc
fatal: not a git repository (or any of the parent directories): .git
  GEN      src/version.h
fatal: not a git repository (or any of the parent directories): .git
make  all-recursive
make[1]: Entering directory '/home/flavorjones/tmp/jq-jq-1.6'
Making all in modules/oniguruma
make[2]: *** No rule to make target 'all'.  Stop.
make[2]: Entering directory '/home/flavorjones/tmp/jq-jq-1.6/modules/oniguruma'
make[2]: Leaving directory '/home/flavorjones/tmp/jq-jq-1.6/modules/oniguruma'
make[1]: *** [Makefile:1107: all-recursive] Error 1
make[1]: Leaving directory '/home/flavorjones/tmp/jq-jq-1.6'
make: *** [Makefile:778: all] Error 2

Does that match what you're seeing?

oniguruma regular expressions captures are not working properly when
linked with ruby
@jakeonfire
Copy link

i'm seeing:

$ make
  GEN      src/builtin.inc
fatal: not a git repository (or any of the parent directories): .git
  GEN      src/version.h
fatal: not a git repository (or any of the parent directories): .git
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
fatal: not a git repository (or any of the parent directories): .git
  CC       src/main.o
  CC       src/builtin.lo
src/builtin.c:194:31: error: implicit declaration of function 'lgamma_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  jv ret = JV_ARRAY(jv_number(lgamma_r(jv_number_value(input), &sign)));
                              ^
1 error generated.
make[2]: *** [src/builtin.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@h0tw1r3
Copy link
Author

h0tw1r3 commented Dec 23, 2022

@jakeonfire looks like you are testing against the main branch, which does not include the changes in this pull request. I have responded to the PR flavorjones/mini_portile#119 on how to reproduce the mini_portile error.

@jakeonfire
Copy link

jakeonfire commented Dec 23, 2022

if i'm running

wget https://github.com/stedolan/jq/archive/jq-1.6.tar.gz
tar -zxvf jq-1.6.tar.gz
cd jq-jq-1.6/
autoreconf -i
./configure --enable-shared --disable-maintainer-mode
make

then the branch isn't a factor, no?

@h0tw1r3
Copy link
Author

h0tw1r3 commented Dec 23, 2022

if i'm running

wget https://github.com/stedolan/jq/archive/jq-1.6.tar.gz
tar -zxvf jq-1.6.tar.gz
cd jq-jq-1.6/
autoreconf -i
./configure --enable-shared --disable-maintainer-mode
make

then the branch isn't a factor, no?

It is.

mini_portile patch_files were added to this pull request. It's the only reason mini_portile is mentioned at all. The build errors you are posting are unrelated.

@h0tw1r3
Copy link
Author

h0tw1r3 commented Dec 23, 2022

@flavorjones as requested, please refer to flavorjones/mini_portile#119 for the steps to reproduce the mini_portile issue.

@niels-s
Copy link

niels-s commented Mar 31, 2023

Also had issues when upgrading to ruby 3.2. Not sure if it's related. Switched to this PR and installed completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants